package com.nowcoder.community.dao;

import com.nowcoder.community.entity.User;
import org.apache.ibatis.annotations.Mapper;

/**
 * @Author: shuhuang
 * @description:
 * @Date: 2022/10/1 16:00
 * @Version java version 1.8
 */
@Mapper
public interface UserMapper {
    /**
     * 根据用户id查询
     *
     * @param id
     * @return
     */
    User selectById(Integer id);

    /**
     * 根据用户名查询
     *
     * @param username
     * @return
     */
    User selectByName(String username);

    /**
     * 根据用户邮箱查询
     *
     * @param email
     * @return
     */
    User selectByEmail(String email);

    int insertUser(User user);

    int updateStatus(Integer id, int status);

    int updateHeaderUrl(Integer id, String headerUrl);

    int updatePassword(Integer id, String password);

}
